using System.Diagnostics.Contracts;

namespace FluentDBC.ContractAction
{
    public class IsNotNullAction : IValidationContractAction
    {
        public string Message { get; private set; }

        public IsNotNullAction(string message)
        {
            Message = message;
        }

        public void ValidationContract(object field)
        {
            Contract.Assert(field != null, Message);
        }
    }
}